﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace MvcCmsOptIn
{
    public class Routes : AreaRegistration
    {
        public override string AreaName
        {
            get { return "MvcCmsOptIn"; }
        }
        public override void RegisterArea(AreaRegistrationContext context)
        {
            var routes = context.Routes;
            routes.MapRoute(
                "OptInDefault",
                "optin-manager/{action}/{Id}/",
                new { controller = "MvcCmsOptIn", action = "Index", Id = 0 }
                ).DataTokens = new RouteValueDictionary(new { area = AreaName });

            routes.MapRoute(
                "OptInAjax",
                "optinajax/{action}/{Id}/",
                new { controller = "MvcCmsOptInAjax", Id = 0 }
                ).DataTokens = new RouteValueDictionary(new { area = AreaName });
        }
    }
}
